package Mediator;

public class User {

    private String name;

    public User(String name){
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void sendMessage(String message){
        // 多个用户的通信, 全部转化成了 聊天室这一个对象的通信
        ChatRoom.showMessage(this, message);
    }
}
